#pragma once

#include "View.h"

namespace mcore
{
	class View;

	class ViewManager
	{
	public:
		ViewManager();
		~ViewManager();

		void addView(View * view);
		
		void setActiveView(View * view);
		bool setActiveView(const std::string & name);

		void onResize();
		void update(float dt);
		void draw();
		bool onWindowMessage(UINT msg, WPARAM wParam, LPARAM lParam);

	private:
		typedef std::map<std::string, View*> ViewMap;
		ViewMap mViews;
		View * mActiveView;
	};

	extern ViewManager * gViewManager;
}
